﻿using AttributeRouting.Web.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Water.Model;


namespace Water.RestService.Controllers
{
    public class BigValveOperatePlanController : ApiController
    {
        private BigValveOperatePlan bvop;
        private BigValveOperatePlanQuery bvopq;

        [POST("AddBigValveOperatePlan")]
        public bool PostAddBigValveOperatePlan(BigValveOperatePlan pbvop)
        {
            bvop = new BigValveOperatePlan();
            return bvop.AddBigValveOperatePlan(pbvop) > 0 ? true : false;
        }

        [GET("DeleteBigValveOperatePlan/{mrno}/{vid}")]
        public bool GetDeleteBigValveOperatePlan(string mrno, string vid)
        {
            bvop = new BigValveOperatePlan();
            return bvop.DeleteBigValveOperatePlan(mrno, vid) > 0 ? true : false;
        }

        [GET("GetBigValveOperatePlanQuery/{mrno}")]
        public BigValveOperatePlanQuery GetBigValveOperatePlanQuery(string mrno)
        {
            bvopq = new BigValveOperatePlanQuery();
            return bvopq.GetBigValveOperatePlanQuery(mrno);
        }
    }
}
